//
//  MLHomeTabBarController.m
//  keJiNews
//
//  Created by 魔龙 on 16/4/15.
//  Copyright © 2016年 魔龙. All rights reserved.
//

#import "MLHomeTabBarController.h"
#import "MLTabBar.h"
@interface MLHomeTabBarController ()<MLTabBarDelegate>

@end

@implementation MLHomeTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    MLTabBar *tabBar = [[MLTabBar alloc]init];
    tabBar.frame = self.tabBar.bounds;
    tabBar.backgroundColor = [UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1];
    
    [self.tabBar addSubview:tabBar];
    
    tabBar.delegate = self;
    
    [tabBar addImageView];
    
    [tabBar addBarButtonWithNorName:@"tabbar_icon_news_normal" andDisName:@"tabbar_icon_news_highlight" andTitle:@"新闻"];
    [tabBar addBarButtonWithNorName:@"tabbar_icon_reader_normal" andDisName:@"tabbar_icon_reader_highlight" andTitle:@"收藏"];
    self.selectedIndex = 0;
}

#pragma mark - ******************** MLTabBarDelegate代理方法
- (void)ChangSelIndexForm:(NSInteger)from to:(NSInteger)to
{
    self.selectedIndex = to;
}
@end
